<template>
  <van-tabbar route>
    <van-tabbar-item :to="{ name: 'home' }" icon="home-o">首页</van-tabbar-item>
    <van-tabbar-item :to="{ name: 'category' }" icon="apps-o"
      >分类</van-tabbar-item
    >
    <van-tabbar-item
      :badge="getSelectedCount"
      :to="{ name: 'shopcart' }"
      icon="shopping-cart-o"
      >购物车</van-tabbar-item
    >
    <van-tabbar-item :to="{ name: 'user' }" icon="user-o">我的</van-tabbar-item>
  </van-tabbar>
</template>
<script>
import { mapGetters } from "vuex";
export default {
  data() {
    return {};
  },
  created() {
    console.log();
  },
  computed: {
    ...mapGetters("shopcart", ["getSelectedCount"]),
  },
};
</script>
